home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13529 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: solon.com!not-for-mail
  2. From: VArase@varase.it.luc.edu (Verne Arase)
  3. Newsgroups: comp.lang.c,comp.lang.c.moderated,hp.unix,comp.sys.hp.apps,comp.sys.hp.hpux
  4. Subject: Re: C coding problem
  5. Date: 8 Apr 1996 11:10:46 -0500
  6. Organization: LUMC
  7. Sender: clc@solutions.solon.com
  8. Approved: clc@solutions.solon.com
  9. Message-ID: <4kbdq6$ec2@solutions.solon.com>
  10. References: <4j06na$808@solutions.solon.com> <4jttan$3gf@solutions.solon.com> <4jv6st$crf@solutions.solon.com> <4k1qh3$5hn@solutions.solon.com> <4k5vrk$a2d@solutions.solon.com>
  11. NNTP-Posting-Host: solutions.solon.com
  12.  
  13. In article <4k5vrk$a2d@solutions.solon.com>,
  14. schwarz@mips.complang.tuwien.ac.at (Konrad Schwarz) wrote:
  15.  
  16.  >|> In such and environment, 
  17.  >|>       *q++ = *p++;
  18.  >|> loses badly to
  19.  >|>       q[i] = p[i], ++i;
  20.  >|> if the hardware indexing works in terms of the objects being
  21.  >|> referenced.
  22.  >
  23.  >Note that indexed addressing often works only for small
  24.  >powers of two, e.g., x86 family.
  25.  
  26. Why only small powers of two? You mean if the size of each element is a
  27. small power of two (so you can use shift rather than multiply)?
  28.  
  29. AFAIK, indexed addressing works with just about all CISC computers, from
  30. the x86 and 68K line through S/360/370/390.
  31.  
  32. Don't recall about DEC VAXen, but when I last looked at the instruction set
  33. I remember whistling "... and a partridge in a pear tree ..."
  34.  
  35. ---
  36. The above are my own opinions, and not those of my employer.
  37.